# Created by: Olivier Duchateau
# $FreeBSD$

PORTNAME=	lightdm-gtk-greeter
PORTVERSION=	1.8.5
CATEGORIES=	x11
MASTER_SITES=	https://launchpadlibrarian.net/174529328/ \
	https://launchpad.net/${PORTNAME}/${PORTVERSION:R}/${PORTVERSION}/+download/

MAINTAINER=	olivierd@FreeBSD.org
COMMENT=	LightDM Gtk+ greeter

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	liblightdm-gobject-1.so:${PORTSDIR}/x11/lightdm
RUN_DEPENDS=	gnome-icon-theme>=3.6.2:${PORTSDIR}/misc/gnome-icon-theme \
	dejavu>=2.34:${PORTSDIR}/x11-fonts/dejavu

USES=	pkgconfig gmake gettext pathfix
GNU_CONFIGURE=	yes
USE_GNOME=	glib20 introspection:build intltool intlhack
USE_XORG=	x11

CONFIGURE_ARGS=--disable-libindicator \
	--disable-libido \
	--disable-indicator-services

SUB_FILES=	pkg-message

OPTIONS_SUB=	yes
OPTIONS_SINGLE=	GTK
OPTIONS_SINGLE_GTK=	GTK2 GTK3
OPTIONS_DEFAULT=	GTK2

GTK2_USE=	GNOME=gtk20
GTK2_CONFIGURE_ON=	--with-gtk2

GTK3_USE=	GNOME=gtk30
GTK3_CONFIGURE_ON=	--without-gtk2

post-patch:
	${CP} ${WRKSRC}/data/lightdm-gtk-greeter.conf \
		${WRKSRC}/data/lightdm-gtk-greeter.conf.sample

.include <bsd.port.mk>
